<?php
function CreateFolder($cf) {
		if(is_dir($_SESSION['dir']."/".$cf)) die("Error: Folder [$cf] already exists!");
		if(@mkdir($_SESSION['dir']."/".$cf)) die("Success: Folder [$cf] created successfully!");
		else die("Error: Unable to create folder! No permissions on filesystem!");
}

require_once('../../conf/main.conf.php');
if(isset($_REQUEST['dir']) && !empty($_REQUEST['dir']))
CreateFolder($_REQUEST['dir']);
else die("Unauthorized access");
?>
